<template>
  <div id="app">
    <!-- 状态栏 -->
    <div class="statusBar" />
    <!-- 导航栏 -->
    <div class="navbar">
      <div class="left">
        <img src="./assets/arrow-left.png" style="height: 24px;width: 24px;">
        <span>
          Back
        </span>
      </div>
      <div class="right">
        <img src="./assets/more-square.png" alt="">
        <img src="./assets/search-normal.png" alt="">
        <img src="./assets/shopping-bag.png" alt="">
      </div>
    </div>
    <!-- 店信息 -->
    <div class="storeInfo">
      <div class="logo">
        <img src="./assets//logo.png">
      </div>
      <div class="title">
        <div class="name">
          McDonald’s
        </div>
        <div class="address">
          <span>
            <img src="./assets/location.png" alt="">
            Bramlea & Sandalwood
          </span>
        </div>
      </div>
      <div class="like">
        <img src="./assets/Frame35.png" alt="">
      </div>
    </div>
    <!-- 页头 -->
    <!-- <van-tabs v-model="active" title-style="height: 59px;">
      <van-tab title="Breakfast Menu">内容 1</van-tab>
      <van-tab title="Lunch & Dinner">内容 2</van-tab>
      <van-tab title="Overnight Menu">内容 3</van-tab>
    </van-tabs> -->
    <div class="tabs">
      <div class="title">Breakfast Menu</div>
      <div class="title active">Lunch & Dinner</div>
      <div class="title">Overnight Menu</div>
    </div>
    <!-- 按钮 -->
    <div class="check">
      <div class="buttom  active">Today’s Deals</div>
      <div class="buttom">Burger Meals</div>
      <div class="buttom">Chicken & Fish</div>
    </div>
    <!-- 商品列表 -->
    <div class="goodsList">
      <div class="goodscell" v-for="(item,index) in goodsList" :key="index">
        <div class="pic">
          <img :src="item.picPath" alt="">
        </div>
        <div class="title">
          <div class="name">
            {{ item.goodname }}
          </div>
          <div class="price">
            <span class="origin">$5.89</span>
            <span class="discount">$4.59</span>
          </div>
        </div>
        <div class="buttom">
          <img src="./assets/Vector_2.png" alt="">
        </div>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'App',
  data() {
    return {
      goodsList:[
        {
          goodname:'Classic Cheese Burger (400 Cals)',
          picPath :require('./assets/goodsPic/Rectangle.png'),
          origin:'$5.89',
          discount:'$4.59'
        },
        {
          goodname:'Simply Cheese with Sesame Seed buns',
          picPath :require('./assets/goodsPic/Rectangle1.png'),
          origin:'$5.89',
          discount:'$4.59'
        },
        {
          goodname:'Veggie & Bacon Hot Sauce Sandwich ',
          picPath :require('./assets/goodsPic/Rectangle2.png'),
          origin:'',
          discount:''
        },
        {
          goodname:'Western BBQ Cheeseburger',
          picPath :require('./assets/goodsPic/Rectangle3.png'),
          origin:'',
          discount:''
        },
        {
          goodname:'Bacon and Veggies Salad',
          picPath :require('./assets/goodsPic/Rectangle4.png'),
          origin:'',
          discount:''
        },
      ]
    };
  },
}
</script>

<style lang="less">
#app {
  * {
    box-sizing: border-box;
    font-family: Everett;
  }

  .statusBar {
    position: absolute;
    top: 0;
    height: 44px;
  }

  .navbar {
    display: flex;
    justify-content: space-between;
    padding: 44px 27px 0;
    height: 93px;

    .left {
      display: flex;
      padding: 7px 0 0;

      span {
        height: 24px;
        margin-left: 5px;
        line-height: 24px;
        color: rgb(41, 45, 50);
        font-family: Everett;
        font-size: 14px;
      }
    }

    .right {
      display: flex;
      justify-content: space-between;
      padding: 7px 0 0;

      img {
        &:nth-child(2) {
          margin: 0 28px;
        }

        height: 24px;
        width: 24px;
      }

    }
  }

  .storeInfo {
    display: flex;
    height: 88px;
    padding: 21px 19px;

    .logo {
      position: relative;
      height: 50px;
      width: 50px;
      margin-right: 13px;
      border-radius: 50%;
      background-color: rgb(221, 68, 61);

      img {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 21.88px;
        height: 18.75px;
        transform: translate(-50%, -50%);
      }
    }

    .title {
      .name {
        height: 30px;
        font-size: 24px;
        line-height: 30px;
        font-family: Everett;
      }

      .address {
        height: 23px;
        font-size: 14px;
        font-family: Everett;

        span {
          img {
            margin-right: 4px;
          }
        }
      }
    }

    .like{
      margin-left: 60px;
    }
  }

  .tabs {
    display: flex;
    overflow-y: scroll;
    height: 60px;
    width: auto;
    padding-bottom: 2px;
    background-color: #eff2f5;

    .title {
      height: 59px;
      padding: 18px 22px;
      color: #B3BFCB;
      font-family: Everett;
      font-size: 17px;
      font-weight: 500;
      letter-spacing: -1%;
      text-align: center;
      white-space: nowrap;
    }

    .active{
        color: #292D32;
        border-bottom: 2px solid;
      }
  }

  .check{
    display: flex;
    height: 67px;
    padding: 18px 21px;
    .buttom{
      height: 40px;
      width: auto;
      margin-right: 5px;
      padding: 0 14px;
      border-radius: 20px;
      font-size: 12px;
      line-height: 40px;
      background-color: #EFF2F5;
    }
    .active{
    background-color: #46505D;
    color: #ffffff;      
    }
  }

  .goodsList{
    .goodscell{
      display: flex;
      align-items: center;
      border-bottom: 1px solid #EFF2F5;
      .pic{
        width: 129px;
        padding: 0 10px 0;
      }
      .title{
        display: flex;
        flex-direction: column;
        margin: 16px 0 18px;
        .name{
          width: 206px;
          font-size: 17px;
          line-height: 23px;
        }
        .price{
          .origin{
            text-decoration-line: line-through;
            margin-right: 6px;
          }
          .discount{
            color: #45B8E9;
          }
        }
      }
      .buttom{
        width: 55px;
        text-align: center;
      }
    }
  }

}
</style>
